<script type="text/javascript" src="module/mod_desa/js/combo.js"></script>

<div id=tiga_ba>
	<div id=tiga_baa>Tambah Desa</div>
	<div id=tiga_bab></div>
	<div class=clear></div>
</div>
            
<form action="utama.php?module=mod_desa&act=simpan" onsubmit="return gsValidate('kode|desa|kabupaten|kecamatan','Kode Desa Harus Diisi|Nama Desa Harus Diisi|Nama Kabupaten|Nama Kecamatan Harus Dipilih','required_numeric|required|required|required');" method="post" enctype="multipart/form-data">
	<table style="margin: 10px 15px 10px 15px;">
		<tr>
			<td>Kode Desa</td>
			<td>
				<input name="kode" type="text" id="kode" class="input_small" />
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Nama Desa</td>
			<td>
				<input name="desa" type="text" class="input2" id="desa" maxlength="50" />
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Provinsi</td>
			<td>
				<select name="provinsi" id="provinsi" class="input2">
					<?php
						$provinsi = mysql_query("select * from propinsi where aktif = 'Y' order by propinsi");
						while($p = mysql_fetch_array($provinsi)){
							if($p['id_propinsi']=='64'){
								$s = "selected";
							}else{
								$s = "";
							}
							echo "<option value='$p[id_propinsi]' $s>$p[propinsi]</option>";
						}
					?>
				</select>
			</td>
		</tr>
		<tr>
			<td>Kabupaten</td>
			<td>
				<select name="kabupaten" id="kabupaten" class="input2">
					<?php
						$kabupaten = mysql_query("select * from kabupaten k inner join propinsi p where k.id_propinsi='64' and k.aktif = 'Y' and p.aktif = 'Y' order by k.kabupaten");
						while($k = mysql_fetch_array($kabupaten)){
							if($k['id_kabupaten']=='6405'){
								$s = "selected";
							}else{
								$s = "";
							}
							echo "<option value='$k[id_kabupaten]' $s>$k[kabupaten]</option>";
						}
					?>
				</select>
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>Kecamatan</td>
			<td>
				<select name="kecamatan" id="kecamatan" class="input2">
					<option value=''> - - Pilih Kecamatan - - </option>
					<?php
						$kecamatan = mysql_query("select * from kecamatan where id_kabupaten='6405' order by kecamatan");
						while($kc = mysql_fetch_array($kecamatan)){
							echo "<option value='$kc[id_kecamatan]'>$kc[kecamatan]</option>";
						}
					?>
				</select>
				<span class="red">*</span>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><input name="submit" type="submit" class="button" value="Simpan" /></td>
		</tr>
	</table>                
</form>		
            
        